import request from '../utils/request'
// 获取用户基本资料
export const getUserBaseInfoAPI = () => {
  return request({
    url: '/v1_0/user'
  })
}
// 获取用户个人资料
export const getUserProfileInfoAPI = () => {
  return request({
    url: '/v1_0/user/profile'
  })
}
// 更新用户头像
export const changeUserPhotoAPI = ({ formObj }) => {
  return request({
    url: '/v1_0/user/photo',
    method: 'PATCH',
    data: formObj
  })
}
// 更新用户数据接口
export const updateUserInfoAPI = ({ birthday, userName }) => {
  return request({
    url: '/v1_0/user/profile',
    method: 'PATCH',
    data: {
      birthday,
      name: userName
    }
  })
}
